Optimal. Leaf size=129 \[ -\frac {a^3 (B+i A) (1+i \tan (e+f x))^3}{6 c^3 f (1-i \tan (e+f x))^3}-\frac {4 i a^3 B}{c^3 f (\tan (e+f x)+i)}-\frac {2 a^3 B}{c^3 f (\tan (e+f x)+i)^2}+\frac {a^3 B \log (\cos (e+f x))}{c^3 f}+\frac {i a^3 B x}{c^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3588, 78, 43} \[ -\frac {a^3 (B+i A) (1+i \tan (e+f x))^3}{6 c^3 f (1-i \tan (e+f x))^3}-\frac {4 i a^3 B}{c^3 f (\tan (e+f x)+i)}-\frac {2 a^3 B}{c^3 f (\tan (e+f x)+i)^2}+\frac {a^3 B \log (\cos (e+f x))}{c^3 f}+\frac {i a^3 B x}{c^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 78
Rule 3588
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^3} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {(a+i a x)^2 (A+B x)}{(c-i c x)^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {a^3 (i A+B) (1+i \tan (e+f x))^3}{6 c^3 f (1-i \tan (e+f x))^3}+\frac {(i a B) \operatorname {Subst}\left (\int \frac {(a+i a x)^2}{(c-i c x)^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {a^3 (i A+B) (1+i \tan (e+f x))^3}{6 c^3 f (1-i \tan (e+f x))^3}+\frac {(i a B) \operatorname {Subst}\left (\int \left (-\frac {4 i a^2}{c^3 (i+x)^3}+\frac {4 a^2}{c^3 (i+x)^2}+\frac {i a^2}{c^3 (i+x)}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {i a^3 B x}{c^3}+\frac {a^3 B \log (\cos (e+f x))}{c^3 f}-\frac {a^3 (i A+B) (1+i \tan (e+f x))^3}{6 c^3 f (1-i \tan (e+f x))^3}-\frac {2 a^3 B}{c^3 f (i+\tan (e+f x))^2}-\frac {4 i a^3 B}{c^3 f (i+\tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 4.71, size = 167, normalized size = 1.29 \[ \frac {a^3 (\cos (3 (e+2 f x))+i \sin (3 (e+2 f x))) \left (\cos (3 (e+f x)) \left (-i A+3 B \log \left (\cos ^2(e+f x)\right )+6 i B f x-B\right )+A \sin (3 (e+f x))+9 i B \sin (e+f x)-i B \sin (3 (e+f x))+6 B f x \sin (3 (e+f x))-3 B \cos (e+f x)-3 i B \sin (3 (e+f x)) \log \left (\cos ^2(e+f x)\right )\right )}{6 c^3 f (\cos (f x)+i \sin (f x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 77, normalized size = 0.60 \[ \frac {{\left (-i \, A - B\right )} a^{3} e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, B a^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 6 \, B a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 6 \, B a^{3} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{6 \, c^{3} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 3.33, size = 255, normalized size = 1.98 \[ \frac {\frac {30 \, B a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c^{3}} - \frac {60 \, B a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c^{3}} + \frac {30 \, B a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c^{3}} + \frac {147 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 60 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 942 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 2445 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 200 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 3620 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 2445 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 60 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 942 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 147 \, B a^{3}}{c^{3} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{6}}}{30 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 164, normalized size = 1.27 \[ -\frac {5 i a^{3} B}{f \,c^{3} \left (\tan \left (f x +e \right )+i\right )}+\frac {a^{3} A}{f \,c^{3} \left (\tan \left (f x +e \right )+i\right )}-\frac {a^{3} B \ln \left (\tan \left (f x +e \right )+i\right )}{f \,c^{3}}-\frac {2 i a^{3} A}{f \,c^{3} \left (\tan \left (f x +e \right )+i\right )^{2}}-\frac {4 a^{3} B}{c^{3} f \left (\tan \left (f x +e \right )+i\right )^{2}}+\frac {4 i a^{3} B}{3 f \,c^{3} \left (\tan \left (f x +e \right )+i\right )^{3}}-\frac {4 a^{3} A}{3 f \,c^{3} \left (\tan \left (f x +e \right )+i\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.97, size = 141, normalized size = 1.09 \[ -\frac {a^3\,\left (15\,B\,{\mathrm {tan}\left (e+f\,x\right )}^2-7\,B+B\,\mathrm {tan}\left (e+f\,x\right )\,18{}\mathrm {i}+A\,{\mathrm {tan}\left (e+f\,x\right )}^2\,3{}\mathrm {i}-A\,1{}\mathrm {i}-3\,B\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )+B\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\mathrm {tan}\left (e+f\,x\right )\,9{}\mathrm {i}+9\,B\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^2-B\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3\,3{}\mathrm {i}\right )}{3\,c^3\,f\,{\left (-1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.98, size = 216, normalized size = 1.67 \[ \frac {B a^{3} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c^{3} f} + \begin {cases} - \frac {- 6 B a^{3} c^{6} f^{2} e^{4 i e} e^{4 i f x} + 12 B a^{3} c^{6} f^{2} e^{2 i e} e^{2 i f x} + \left (2 i A a^{3} c^{6} f^{2} e^{6 i e} + 2 B a^{3} c^{6} f^{2} e^{6 i e}\right ) e^{6 i f x}}{12 c^{9} f^{3}} & \text {for}\: 12 c^{9} f^{3} \neq 0 \\- \frac {x \left (- A a^{3} e^{6 i e} + i B a^{3} e^{6 i e} - 2 i B a^{3} e^{4 i e} + 2 i B a^{3} e^{2 i e}\right )}{c^{3}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________